Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validating admissionchecks #1220

Merged

Conversation

stuton
Copy link
Contributor

@stuton stuton commented Oct 18, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

Validate PodSetUpdates field to avoid errors during workload admission

Which issue(s) this PR fixes:

Fixes #1187

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 18, 2023
@netlify
Copy link

netlify bot commented Oct 18, 2023

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit c7ea96d
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6537bda3e526230008b54ddf
😎 Deploy Preview https://deploy-preview-1220--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 18, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @stuton. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 18, 2023
@stuton stuton changed the title validate admissionchecks Validating admissionchecks Oct 18, 2023
@tenzen-y
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 18, 2023
@stuton stuton force-pushed the validate-workload-podsetupdates branch from 6ed3537 to 1dac6a1 Compare October 18, 2023 13:42
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 18, 2023
@stuton stuton marked this pull request as ready for review October 18, 2023 13:43
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 18, 2023
@alculquicondor
Copy link
Contributor

/assign @mimowo

@trasc
Copy link
Contributor

trasc commented Oct 19, 2023

@stuton , @mimowo should we also make sure that the PodSetUpdates of a admission check is not changed when
oldAC.State == newAC.State == Ready

@mimowo
Copy link
Contributor

mimowo commented Oct 19, 2023

@stuton , @mimowo should we also make sure that the PodSetUpdates of a admission check is not changed when
oldAC.State == newAC.State == Ready

I think so, it's easier to relax if needed, than make validation strong later.

pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook.go Show resolved Hide resolved
pkg/webhooks/workload_webhook_test.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
@tenzen-y
Copy link
Member

tenzen-y commented Oct 20, 2023

@stuton @mimowo Is this bugs? It looks like cleanup or feature request.

@alculquicondor
Copy link
Contributor

/remove-kind bug
/kind feature

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/bug Categorizes issue or PR as related to a bug. labels Oct 20, 2023
pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook_test.go Show resolved Hide resolved
@tenzen-y
Copy link
Member

otherwise lgtm

pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook.go Outdated Show resolved Hide resolved
pkg/webhooks/workload_webhook_test.go Show resolved Hide resolved
pkg/webhooks/workload_webhook_test.go Show resolved Hide resolved
pkg/webhooks/workload_webhook_test.go Outdated Show resolved Hide resolved
@stuton stuton force-pushed the validate-workload-podsetupdates branch from b219249 to ec7f07a Compare October 23, 2023 10:35
Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

production code LGTM
This is just missing test cases for objects that pass validation (on create and on update)

@stuton stuton force-pushed the validate-workload-podsetupdates branch from 950ad18 to c7ea96d Compare October 24, 2023 12:50
Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

pkg/webhooks/workload_webhook_test.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 24, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c4b53789967d7ecbcaeea5badcdae0eb511cfc4f

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, stuton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 24, 2023
@k8s-ci-robot k8s-ci-robot merged commit cd482ea into kubernetes-sigs:main Oct 24, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.5 milestone Oct 24, 2023
@alculquicondor
Copy link
Contributor

/release-note-edit

NONE

Because it's a continuation to #1045 and #1180

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Oct 25, 2023
@trasc trasc deleted the validate-workload-podsetupdates branch May 23, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate workload PodSetUpdates
6 participants